package FunctionDemo.demo3;

public class Student {
    private int age;
    private String name;
    public Student(String name,int age) {
        this.age = age;
        this.name = name;
    }
    public Student() {
    }
    public Student(String str) {
        String[] sarr = str.split(",");
        this.name = sarr[0];
        this.age = Integer.parseInt(sarr[1]);
    }

    /**
     * @return int return the age
     */
    public int getAge() {
        return age;
    }

    /**
     * @param age the age to set
     */
    public void setAge(int age) {
        this.age = age;
    }

    /**
     * @return String return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

}
